package com.knife.blog.util;

import java.io.InputStream;

import org.apache.log4j.Logger;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.io.SAXReader;

public class XmlparseUtil {
	
	private static final Logger logger = Logger.getLogger(XmlparseUtil.class);
	
	public XmlparseUtil(){
		//init(in);
	}
	
	private void init(InputStream in){
		
	}
	
	public Document initDoc(InputStream in){
		Document doc=null;
		SAXReader reader = new SAXReader();
		try {
			doc = reader.read(in);
		} catch (DocumentException e) {
			// TODO 自动生成 catch 块
			logger.debug("Document对象创建失败！");
			e.printStackTrace();
		}
		return doc;
	}
	
	public void parse(){
		
	}
}
